﻿<Window x:Class="HM.UI.Windows.ManageRegularExpensesWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Regular Expenses Manager" SizeToContent="WidthAndHeight"
        MaxHeight="600">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <ToolBarTray Grid.Row="0">
            <ToolBar Template="{StaticResource threeButtonToolBar}" />
        </ToolBarTray>
        <ListBox
            Grid.Row="1"
            ItemsSource="{Binding RegularExpenses}"
            SelectedItem="{Binding SelectedRegularExpense}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid Margin="4">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="300" />
                        </Grid.ColumnDefinitions>
                        <TextBox
                            Grid.Column="0"
                            Text="{Binding Description, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Margin="5" />
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</Window>
